Skip to content

Read the letters those languages use, and bound a /ToUnicode map - #1

Merged
tannevaled merged 1 commit into
mainfrom
bump-pdfkit-deps
Aug 27, 2026
Merged

Read the letters those languages use, and bound a /ToUnicode map#1
tannevaled merged 1 commit into
mainfrom
bump-pdfkit-deps

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Measurements are being run now and will be added to this body before review.

pdffont v0.2.0 -> v0.3.0, reader v0.4.1 -> v0.4.2.

A form is filled in with text, and read back as text. Glyph names covering
Czech, Polish, Slovak, Hungarian, Turkish, Romanian, Latvian and Lithuanian
letters mapped to nothing at all, and names spelling more than one
character -- a letter and its accent, a Hebrew cluster -- were refused. An
appearance is drawn from those names, so a value this could not spell was a
value nobody could see.

The same pdffont release bounds how many codes one /ToUnicode map may name:
10 655 bytes of it used to produce 13 million entries, 1 054 MB and about
ten seconds, per font, per page.

reader v0.4.2 fixes InlineImage.Expanded, which let Go's randomised map
iteration order decide between both spellings of a key -- /W beside
/Width -- so the same file read five different ways in eight runs.

A .gitignore comes with it. This is the only module of the family without
one, which is how a coverage profile nearly went in with this commit; the
other five all ignore exactly this file.
@tannevaled
tannevaled merged commit 0f548b7 into main Aug 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant